<style>
.testimonial_r_w{
	width:749px;
	float:left;
}
.testimonial_l_w{
	width:90px;
	float:right;
}
.grid {
  *zoom: 1;
  border-bottom:2px dotted #ddd;
  margin-left:25px;
  margin-right:25px;
  padding-bottom:20px;
}

.grid:before,
.grid:after {
  display: table;
  line-height: 0;
  content: "";
}

.grid:after {
  clear: both;
}
.float_l{
	float:left;
}
.float_r{
	float:right;
}
</style>
<?php $header=$this->action('ZfcAdmin\Controller\AdminController', 'headerAction');
	  $baseUrl = $header->headerarray['baseUrl'];
?>
<div class="container">
	<div class="well min_height pos_r">
		<div class="pos_absolute">
			<a href="<? echo $baseUrl;?>users/add-testimony">Add testimonial</a>
		</div>
		<div class="inner_title">
				<h3>Testimonials View</h3>
		</div>
		<? if(isset($this->testimonyLists) && ($this->testimonyLists->count()>0)){ foreach($this->testimonyLists as $testimonials){?>
			<div class="grid">
			<div class="float_l testimonial_r_w">
				<div class="media">
				<div class="media-body">
				<h4 class="media-heading"><? echo ucfirst($testimonials->user_name);?></h4>
				<? echo $testimonials->review_text;?>
				</div>
				</div>
			</div>
			<? if($testimonials->user_id==$_SESSION['user']['user_id']){?>
			<div class="float_r testimonial_l_w">
				<div class="btn-group">
				<button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">Mini button <span class="caret"></span></button>
				<ul class="dropdown-menu">
				<li><a href="<? echo $baseUrl;?>users/add-testimony?testimony_id=<?echo $testimonials->review_id;?>">Edit Post</a></li>
				<li><a href="javascript:void(0);" onClick="deleteTestimony(<?echo $testimonials->review_id;?>)" >Delete</a></li>
				</ul>
				</div>
			</div>
			<?}?>
			</div><br/>
		<?}}else{?>
		<div class="grid">
			<div class="float_l span11">
				<div class="media">
				<a class="pull-left" href="#">
				<img src="" style="width: 64px; height: 64px;" alt="64x64" class="media-object" data-src="holder.js/64x64">
				</a>
				<div class="media-body">
				<h4 class="media-heading">Media heading</h4>
				Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
				</div>
				</div>
			</div>
			<div class="float_r">
				<div class="btn-group">
				<button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">Mini button <span class="caret"></span></button>
				<ul class="dropdown-menu">
				<li><a href="#">Edit Post</a></li>
				<li><a href="#">Change Date</a></li>
				<li><a href="#">Delete Post</a></li>
				<li><a href="#">Delete</a></li>
				</ul>
				</div>
			</div>
			</div>
		<?}?>
	<div class="prvious_next">
		<?php 
			echo $this->paginationControl(
				$this->testimonyLists,
				'sliding',
				array('partial/paginator.phtml', 'Application'),
				array(
					'route' => 'testimonial',
				)
			);
		?>
	</div>
	</div>
</div>
	
	